package nxu.it.dao;

import com.mysql.cj.jdbc.MysqlDataSource;
import org.jdbi.v3.core.Jdbi;

import javax.sql.DataSource;

/**
 * @author yangliu
 * @project project_design
 * @sid 12020243892
 * @date 2022/12/19 - 19:42
 */

public class DBHelper {

    public static final DataSource DATA_SOURCE;
    public static final Jdbi JDBI;

    static {
        MysqlDataSource mysqlDataSource = new MysqlDataSource();
        mysqlDataSource.setUrl("jdbc:mysql://bj-cynosdbmysql-grp-imx9gbby.sql.tencentcdb.com:24356/prodesign");
        mysqlDataSource.setUser("design");
        mysqlDataSource.setPassword("test123.");
        DATA_SOURCE = mysqlDataSource;
        JDBI = Jdbi.create(mysqlDataSource);
    }
}
